package myorg.myrpc;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;

import org.apache.commons.configuration2.CombinedConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import myorg.myrpc.CommonConstant;

/**
 * 服务端常量定义
 * @author unknow_author
 *
 */
public interface ServiceConstant extends CommonConstant{
    public static final Logger logger = LoggerFactory.getLogger(ServiceConstant.class);
    
    /** salt for password */
    public static final String TOKEN_SALT = "token.salt";

	/////////////////////////////////////////////////
	
	/** database 配置属性前缀 */
	public static final String PREFIX_DATABASE = "database.";
	
	/** 全局配置参数对象 */
	public static final CombinedConfiguration CONFIG = GlobalConfig.getConfig();
	
	/** 全局线程池(自动退出封装) */
	public static final ExecutorService GLOBAL_EXCEUTOR = ExecutorProvider.getGlobalExceutor();

	/** 定时任务线程池对象(自动退出封装) */
	public static final ScheduledExecutorService TIMER_EXECUTOR = ExecutorProvider.getTimerExecutor();
}
